<include file="public@header"/>
<link href="__STATIC__/admin/js/cityLayout.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/admin/js/cityselect.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/jquery-1.9.1.min.js"></script>
<script>
$(function(){
    init_city_select($("#sel1, #sel2"));
});
function getValue() {
    alert($('#sel1').val());
}
</script>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('activity/index')}">活动列表</a></li>
        <li class="active"><a href="{:url('activity/add')}">添加活动</a></li>
        <li><a href="{:url('activity/lst')}">活动报名记录</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('activity/add')}"
          method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动名称</label>
                            <div class="col-md-3 col-sm-5">
                                <input type="text" class="form-control" name="name"
                                       value="{$name|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动内容</label>
                            <div class="col-md-3 col-sm-5">
                                <textarea name="content" cols="40" rows="7"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">限定人数</label>
                            <div class="col-md-3 col-sm-5">
                                <input type="text" class="form-control" name="num"
                                       value="{$num|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动状态</label>
                            <div class="col-md-3 col-sm-5">
                                <select name="status" class="form-control">
                                    <option value="1">--下线--</option>
                                    <option value="2">--发布--</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">地区选择</label>
                            <div class="col-md-3 col-sm-5">
                                <!-- <input type="text" class="form-control" name="answer[C]"
                                        value="{$answer['C']|default=''}"> -->
                                <input name="city" id="sel1"  type="text"  class="city_input form-control" readonly="readonly">
                            
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">图片上传</label>
                            <div class="col-md-3 col-sm-5">
                                <input id="photo-1" type="hidden" name="img">
                                <input id="photo-1-name" type="text" name="photo_name" title="图片名称">
                                <img id="photo-1-preview" >
                                <a href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" style="width:150px;" class="btn btn-primary">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
